package com.dec.kks.etl;

import java.io.InputStream;
import java.net.Socket;

public class ScoketTcp {

    public static void main(String[] args) throws Exception {

        Socket s = new Socket("localhost",8800);

        while (true) {
            InputStream stream = s.getInputStream();
            byte[] bytes = new byte[1024];
            int b = stream.read(bytes);
            for (int i = 0; i < 10; i++) {
                System.out.println(bytes[i]);
            }
            Thread.sleep(1000L);

        }
    }
}
